Conversation
…/destroy lifecycle spawned npm/npx/cdk/tsx via execFileSync/spawn. On Windows these are .cmd shims, so a direct exec fails with 'spawnSync npx ENOENT' (no PATHEXT resolution), and Node refuses to run .cmd/.bat without a shell. Route these calls through a cross-spawn-backed runSync/spawnCommand helper that resolves the shim and quotes args (incl. paths with spaces) while keeping the safe array-arg form. Fixes #19
…dows fix without AWS: reproduces the raw execFileSync('npx') ENOENT, then asserts the runSync/spawnCommand helper spawns the npx/npm shims on windows-latest. Triggered on the ci/win branch and via workflow_dispatch. Delete this workflow once #19 is verified/merged.
…the default template from a local registry built off this branch, then runs 'npm run build' and a 'npm run dev' smoke (waits for the Blocks server on :3000, then tears down). Confirms a Windows user can build and run a Blocks app end to end with no AWS. Validated locally on macOS before pushing. Temporary — delete with the rest of windows-deploy-check.yml before merge.
svidgen
previously approved these changes
Jun 17, 2026
…ld:packages lists workspaces non-topologically, so on a clean checkout a referenced package's generated version.ts is missing when a dependent compiles (tsc TS2307 on './version.js'). Generate all version files via the workspace prebuild step first.
…os.tmpdir() on Windows runners is the mangled short path (C:\Users\RUNNER~1\...). Vite's html-inline-proxy fails when the short/long path forms differ ('No matching HTML proxy module found'). Use RUNNER_TEMP (D:\a\_temp, a clean long path) so 'npm run build' mirrors a real user's project dir.
…op the temporary spawn-check and template build/dev smoke jobs (and their driver script). Add windows-e2e.yml: a standalone workflow that runs the real production E2E on windows-latest, mirroring the Linux e2e-production job (OIDC creds, real cdk deploy/destroy). This is the high-fidelity #19 regression check — it runs the actual 'npm run deploy' spawn path on Windows. Kept separate from pr-checks.yml and not wired into the required gate, so it is optional for now (runs on every PR, non-blocking). Uses a windows-scoped stack suffix and an always-run destroy backstop.
… CDK constructs and the pipeline stage loader imported the backend by raw absolute path with a cache-busting query (${absPath}?stack=...). On Windows an absolute path like D:\... is parsed as URL scheme 'd:' and rejected with ERR_UNSUPPORTED_ESM_URL_SCHEME during synth. Build a file:// URL via pathToFileURL first. Also fix the Windows E2E workflow to set BLOCKS_TEST_ENV via step env (the test:production npm script uses a bash-only VAR=value prefix that cmd.exe can't parse) and expand the changeset to cover both Windows deploy fixes.
…geset - Scaffold create-blocks-app --template backend (Lambda + API Gateway only, no DynamoDB/GSI/Aurora) for fast deploy/destroy; drop the build phase (backend template has no frontend). Phases: dev -> sandbox -> deploy. - Add a no-op patch changeset to republish bb-app-setting, bb-auth-cognito, bb-auth-oidc, bb-distributed-table, bb-email-client, bb-knowledge-base, bb-kv-store, bb-tracer.
…ings Replace log-string matching with product-artifact signals: - dev: wait until .blocks-sandbox/config.json is written and its apiUrl port answers HTTP (port-agnostic; fixes the :3001 hardcoded-3000 miss). - sandbox: wait until CDK writes .blocks-sandbox/outputs.json. Both fail fast if the child exits early or times out. No console-log wording dependency.
…- windows-e2e: schedule (08:00 & 14:00 UTC) + workflow_dispatch, drop PR trigger; per-run stack suffix; condense comments. - Trim the changeset and verbose code comments to the essentials. - Revert the e2e.test.ts npx->node change (unused after switching to the scaffolded backend-template driver). cross-spawn stays a runtime dependency (it executes in the user's project).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #19 -
npm run deploy(andsandbox,sandbox:destroy,destroy, and external-DB migrations) crashed on Windows withspawnSync npx ENOENT.Root cause: on Windows
npm/npx/cdk/tsxare.cmdshims. The deploy lifecycle spawned them withexecFileSync/spawn, which do a direct exec without WindowsPATHEXTresolution (sonpxis never found), and which Node refuses to run for.cmd/.batwithout a shell. The crash happens at the spawn step, before any AWS call.Fix: a small
cross-spawn-backed helper (runSync/spawnCommand) that resolves the shim and quotes arguments correctly (including project paths with spaces), keeping the safe array-arg form (no shell injection). All six npm/npx/cdk spawn sites indeploy.ts,destroy.ts,sandbox.ts, andexternal-migrations-step.tsnow route through it.nodeinvocations are unchanged (node.exeresolves fine).Verification
@aws-blocks/corebuilds clean; all 549 core unit tests pass.spawnCommandreturns a live ChildProcess.windows-latestCI job (.github/workflows/windows-deploy-check.yml) reproduces the original ENOENT and asserts the helper spawns the npx/npm shims on Windows. Delete this workflow before merge - it only triggers onci/win/dispatch and should not land onmain.Release
Includes a changeset (
@aws-blocks/corepatch) so this ships as a patch release to unblock users.Not covered (separate Windows gaps, not part of #19)
console.tsspawnsopen(macOS-only) andaws.cleanup.tsuseslsof/kill(Unix-only).Worth a follow-up if full Windows support is a goal.